package com.singlemusic.pojo;

/**
 * TrackartistId entity. @author MyEclipse Persistence Tools
 */

public class TrackartistId implements java.io.Serializable {

	// Fields

	private Artists artists;
	private Tracks tracks;

	// Constructors

	/** default constructor */
	public TrackartistId() {
	}

	/** full constructor */
	public TrackartistId(Artists artists, Tracks tracks) {
		this.artists = artists;
		this.tracks = tracks;
	}

	// Property accessors

	public Artists getArtists() {
		return this.artists;
	}

	public void setArtists(Artists artists) {
		this.artists = artists;
	}

	public Tracks getTracks() {
		return this.tracks;
	}

	public void setTracks(Tracks tracks) {
		this.tracks = tracks;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TrackartistId))
			return false;
		TrackartistId castOther = (TrackartistId) other;

		return ((this.getArtists() == castOther.getArtists()) || (this
				.getArtists() != null && castOther.getArtists() != null && this
				.getArtists().equals(castOther.getArtists())))
				&& ((this.getTracks() == castOther.getTracks()) || (this
						.getTracks() != null && castOther.getTracks() != null && this
						.getTracks().equals(castOther.getTracks())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getArtists() == null ? 0 : this.getArtists().hashCode());
		result = 37 * result
				+ (getTracks() == null ? 0 : this.getTracks().hashCode());
		return result;
	}

}